package com.jic.market.service;

import com.jic.market.entity.PromotionLimitRuleEntity;
import com.jic.market.request.PromotionLimitRuleRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description: PromotionLimitRuleService
 * date: 2020/1/16 19:24
 * author: admin
 * version: 1.0
 */
public interface PromotionLimitRuleService {

    void updatePriceOrLimit(PromotionLimitRuleRequest ruleRequest);

    void delete(List<Long> ids);

    /**
     * 添加促销限制项目
     * @param PromotionLimitRule
     * @return
     */
    Integer addPromotionLimitRule(PromotionLimitRuleEntity PromotionLimitRule);

    /**
     * 根据 促销id 和 商品id 查询
     * @param promotionId
     * @param mpId
     * @return
     */
    PromotionLimitRuleEntity getEntityByPromotionIdAndMpId(Long promotionId ,Long mpId);

    /**
     * 根据 促销id 和 商品id 软删除
     * @param promotionId
     * @param productId
     * @return
     */
    Integer deleteEntityByPromotionIdAndMpId(Long promotionId ,Long productId);

    Long insert(PromotionLimitRuleRequest ruleRequest);
}
